import Vue from 'vue';
import Router from 'vue-router';
import App from '../App.vue';
import firstHM from '@/components/firstHM.vue';
//大作业
import homePage from '@/components/homePage.vue';
import introducePage from '@/components/introducePage.vue';
import routerPage from '@/components/routerPage.vue';
import producerPage from '@/components/producerPage.vue';
import audiencePage from '@/components/audiencePage.vue';


Vue.use(Router);

export default new Router({
	routes: [
		{ path: '/', redirect: '/introducePage' }, // 默认就跳转此页面
		{
			path: '/firstHM',
			name: 'firstHM',
			component: firstHM,
		},
		{
			path: '/introducePage',
			name: 'introducePage',
			component: introducePage,
		},
		{
			path: '/routerPage',
			name: 'routerPage',
			component: routerPage,
			children:[
				{
					path: '/homePage',
					name: 'homePage',
					component: homePage,
				},
				{
					path: '/audiencePage',
					name: 'audiencePage',
					component: audiencePage,
				},
				{
					path: '/producerPage',
					name: 'producerPage',
					component: producerPage,
				},
			],
		}

	]
});
